package com.atguigu.day10.test14;

import com.sun.corba.se.impl.ior.FreezableList;

public class Test14_1 {
    public static void main(String[] args) {
        Graphic c = new Circle(3);
        Graphic r = new Rectangle(3,6);
        Graphic t = new Triangle();
        Test14_1 a = new Test14_1();
        System.out.println(a.method_1(c,r));
        System.out.println(a.method_2(c,r));

        System.out.println(c.getArea()==r.getArea());


    }
    boolean method_1(Graphic c,Graphic r){
        if (c.getArea()==r.getArea())
            return true;
        else
            return false;
    }
    Graphic method_2(Graphic c,Graphic r){
        if (c.getArea()>r.getArea())
            return c;
        else if (c.getArea()<r.getArea())
            return r;
        else
            return c;
    }
}

